Skip to content

Add update_user_profile MCP tool#2419

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/update-user-profile-management
Draft

Add update_user_profile MCP tool#2419
Copilot wants to merge 2 commits intomainfrom
copilot/update-user-profile-management

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 1, 2026

Summary

Adds a new update_user_profile tool to the Context toolset, enabling agents to update the authenticated user's GitHub profile via PATCH /user.

Why

The Context toolset had get_me for reading profile data but no write counterpart for updating it.

What changed

  • Added UpdateUserProfile tool in pkg/github/context_tools.go — accepts optional fields (name, email, blog, twitter_username, company, location, hireable, bio), requires at least one field, returns updated MinimalUser
  • Registered tool in AllTools in pkg/github/tools.go
  • Added PatchUser = "PATCH /user" endpoint constant to helper_test.go
  • Added Test_UpdateUserProfile with cases: single-field update, multi-field update, no-fields error, client error, API error
  • Created toolsnap update_user_profile.snap
  • Regenerated README and docs

MCP impact

  • New tool added — update_user_profile in the context toolset; requires user OAuth scope

Prompts tested (tool changes only)

  • "Update my GitHub profile name to 'Jane Doe' and set my bio to 'Engineer at Acme'"
  • "Set my GitHub profile location to 'San Francisco' and mark me as hireable"
  • "Update my Twitter username on GitHub to @janedoe"

Security / limits

  • Auth / permissions considered — requires user OAuth scope (grants read/write to profile info); fine-grained PATs need profile write permission

Tool renaming

  • I am not renaming tools as part of this PR

Lint & tests

  • Linted locally with ./script/lint
  • Tested locally with ./script/test

Docs

  • Updated (README / docs / examples)

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • golangci-lint.run
    • Triggering command: /usr/bin/curl curl -sSfL REDACTED l/linux_amd64/vet /tmp/go-build1744740609/b248/vet.cfg ault.go --global ux-amd64/pkg/tool/linux_amd64/compile core.hooksPath (dns block)
  • raw.api.githubcopilot.com
    • Triggering command: /tmp/go-build720382805/b356/http.test /tmp/go-build720382805/b356/http.test -test.testlogfile=/tmp/go-build720382805/b356/testlog.txt -test.paniconexit0 -test.timeout=10m0s /tmp/go-build720382805/b147/vet.cfg ux-amd64/src/run-errorsas mpile ux-amd64/pkg/tool/linux_amd64/vet /tmp/go-build981/home/REDACTED/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.25.0.linux-amd64/pkg/too-buildtags -O2 t ux-amd64/pkg/too/tmp/go-build720382805/b176/vet.cfg (dns block)
  • raw.ghe.example.com
    • Triggering command: /tmp/go-build720382805/b367/oauth.test /tmp/go-build720382805/b367/oauth.test -test.testlogfile=/tmp/go-build720382805/b367/testlog.txt -test.paniconexit0 -test.timeout=10m0s eZLOObdCANydOduaZ5Bh/eZLOObdCANydOduaZ5Bh -goversion go1.25.0 -c=4 -race -nolocalimports -importcfg /tmp/go-build720382805/b231/importcfg (dns block)
  • raw.mycompanygithub.com
    • Triggering command: /tmp/go-build720382805/b405/utils.test /tmp/go-build720382805/b405/utils.test -test.testlogfile=/tmp/go-build720382805/b405/testlog.txt -test.paniconexit0 -test.timeout=10m0s uOjjyVHBjbejg2oLJ351/uOjjyVHBjbejg2oLJ351 -dwarf=false -goversion go1.25.0 -c=4 -race -nolocalimports -importcfg (dns block)
  • raw.myghe.com
    • Triggering command: /tmp/go-build720382805/b405/utils.test /tmp/go-build720382805/b405/utils.test -test.testlogfile=/tmp/go-build720382805/b405/testlog.txt -test.paniconexit0 -test.timeout=10m0s uOjjyVHBjbejg2oLJ351/uOjjyVHBjbejg2oLJ351 -dwarf=false -goversion go1.25.0 -c=4 -race -nolocalimports -importcfg (dns block)
  • raw.notgithub.com
    • Triggering command: /tmp/go-build720382805/b405/utils.test /tmp/go-build720382805/b405/utils.test -test.testlogfile=/tmp/go-build720382805/b405/testlog.txt -test.paniconexit0 -test.timeout=10m0s uOjjyVHBjbejg2oLJ351/uOjjyVHBjbejg2oLJ351 -dwarf=false -goversion go1.25.0 -c=4 -race -nolocalimports -importcfg (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

s

Created from VS Code.

Agent-Logs-Url: https://github.com/github/github-mcp-server/sessions/8180b3b5-6e5d-44bb-bff0-72b375d242ab

Co-authored-by: RossTarrant <14926097+RossTarrant@users.noreply.github.com>
Copilot AI changed the title [WIP] Update user profile management system Add update_user_profile MCP tool May 1, 2026
Copilot AI requested a review from RossTarrant May 1, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants